package com.situ.mybatis.test;

import java.util.ArrayList;
import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import com.situ.mybatis.entity.Student;
import com.situ.mybatis.mapper.IStudentDao;
import com.situ.mybatis.util.MyBatisUtil;

public class MyBatisTest3 {
	
	@Test
	public void test1() {
		SqlSession sqlSession = MyBatisUtil.getSqlSession();
		IStudentDao studentDao = sqlSession.getMapper(IStudentDao.class);
		List<Student> list = studentDao.one2oneList();
		for (Student stu : list) {
			System.out.println(stu);
		}
	}
}

